package com.yangwei.examination.teacher.mappers;

import com.yangwei.examination.teacher.pojo.BankQuestionChoice;
import com.yangwei.examination.teacher.pojo.PaperQuestionChoice;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface PaperQuestionChoiceDtoMapper {

    PaperQuestionChoiceDtoMapper INSTANCE = Mappers.getMapper(PaperQuestionChoiceDtoMapper.class);

    @Mappings({
            @Mapping(target = "id",  ignore = true),
            @Mapping(target = "questionId", ignore = true),
    })
    PaperQuestionChoice toPaperQuestionChoiceDto(BankQuestionChoice bankQuestionChoice);

    List<PaperQuestionChoice> toPaperQuestionChoiceListDto(List<BankQuestionChoice> bankQuestionChoiceList);

}
